.class final Lcom/farmis/feedme/views/FeedbackView$1;
.super Ljava/lang/Object;
.source "FeedbackView.kt"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/farmis/feedme/views/FeedbackView;-><init>(Landroid/app/Activity;Lcom/farmis/feedme/views/FeedbackView$FeedBackListener;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x18
    name = null
.end annotation

.annotation system Ldalvik/annotation/SourceDebugExtension;
    value = "SMAP\nFeedbackView.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FeedbackView.kt\ncom/farmis/feedme/views/FeedbackView$1\n*L\n1#1,45:1\n*E\n"
.end annotation


# instance fields
.field final synthetic $listener:Lcom/farmis/feedme/views/FeedbackView$FeedBackListener;

.field final synthetic this$0:Lcom/farmis/feedme/views/FeedbackView;


# direct methods
.method constructor <init>(Lcom/farmis/feedme/views/FeedbackView;Lcom/farmis/feedme/views/FeedbackView$FeedBackListener;)V
    .locals 0

    iput-object p1, p0, Lcom/farmis/feedme/views/FeedbackView$1;->this$0:Lcom/farmis/feedme/views/FeedbackView;

    iput-object p2, p0, Lcom/farmis/feedme/views/FeedbackView$1;->$listener:Lcom/farmis/feedme/views/FeedbackView$FeedBackListener;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final onClick(Landroid/view/View;)V
    .locals 2

    .line 32
    iget-object p1, p0, Lcom/farmis/feedme/views/FeedbackView$1;->this$0:Lcom/farmis/feedme/views/FeedbackView;

    sget v0, Lcom/farmis/feedme/R$id;->editText:I

    invoke-virtual {p1, v0}, Lcom/farmis/feedme/views/FeedbackView;->_$_findCachedViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/EditText;

    const-string v0, "editText"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object p1

    const-string v1, "editText.text"

    invoke-static {p1, v1}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-interface {p1}, Ljava/lang/CharSequence;->length()I

    move-result p1

    if-nez p1, :cond_0

    const/4 p1, 0x1

    goto :goto_0

    :cond_0
    const/4 p1, 0x0

    :goto_0
    if-eqz p1, :cond_1

    .line 33
    iget-object p1, p0, Lcom/farmis/feedme/views/FeedbackView$1;->this$0:Lcom/farmis/feedme/views/FeedbackView;

    sget v0, Lcom/farmis/feedme/R$id;->feedbackTextView:I

    invoke-virtual {p1, v0}, Lcom/farmis/feedme/views/FeedbackView;->_$_findCachedViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Lcom/google/android/material/textfield/TextInputLayout;

    const-string v0, "feedbackTextView"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    iget-object v0, p0, Lcom/farmis/feedme/views/FeedbackView$1;->this$0:Lcom/farmis/feedme/views/FeedbackView;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->getContext()Landroid/content/Context;

    move-result-object v0

    sget v1, Lcom/farmis/feedme/R$string;->dialog_answer_error:I

    invoke-virtual {v0, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Lcom/google/android/material/textfield/TextInputLayout;->setError(Ljava/lang/CharSequence;)V

    goto :goto_1

    .line 35
    :cond_1
    iget-object p1, p0, Lcom/farmis/feedme/views/FeedbackView$1;->this$0:Lcom/farmis/feedme/views/FeedbackView;

    sget v1, Lcom/farmis/feedme/R$id;->editText:I

    invoke-virtual {p1, v1}, Lcom/farmis/feedme/views/FeedbackView;->_$_findCachedViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/EditText;

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object p1

    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object p1

    .line 36
    iget-object v0, p0, Lcom/farmis/feedme/views/FeedbackView$1;->$listener:Lcom/farmis/feedme/views/FeedbackView$FeedBackListener;

    invoke-interface {v0, p1}, Lcom/farmis/feedme/views/FeedbackView$FeedBackListener;->onFeedbackSent(Ljava/lang/String;)V

    :goto_1
    return-void
.end method
